package com.zzy.springbootdemo.design_05_singleton;

/**
 * 懒汉模式（线程不安全）
 */
public class Singleton_02 {

    private static Singleton_02 singleton_02;

    private Singleton_02(){
    }

    public Singleton_02 getInstance(){
        if(singleton_02 != null){
            return singleton_02;
        }
        return new Singleton_02();
    }

}
